<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">

<head>
    <meta charset="UTF-8">
    <title>站点任务</title>
    <link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" />
    <link rel="stylesheet" href="__PUBLIC__/css/global.css" media="all">
    <link href="__PUBLIC__/Font-Awesome/css/font-awesome.css" rel="stylesheet" />
</head>

<body>
<div class="admin-main">
    <blockquote class="layui-elem-quote">
        <form  class="layui-form" action="">
            <div class="custom-form-item">
                <label class="layui-form-label">站点列表：</label>
                <div class="layui-input-inline">
                    <select name="site">
                        <option value="">站点列表</option>
                        <volist name="sitedao" id="site">
                            <option value="{$site.site_id}" <if condition="$_GET['site'] eq $site['site_id']">selected</if> >{$site.site_name}</option>
                        </volist>
                    </select>
                </div>
            </div>
            <div class="custom-form-item">
                <label class="layui-form-label">任务状态：</label>
                <div class="layui-input-inline">
                    <select name="status">
                        <option value="">任务状态</option>
                        <option value="1" <if condition="$_GET['status'] eq 1">selected</if>>开启</option>
                        <option value="2" <if condition="$_GET['status'] eq 2">selected</if>>关闭</option>
                    </select>
                </div>
            </div>
            <!--<div class="custom-form-item">
                <label class="layui-form-label">任务链接：</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" value="<?php echo !empty($map['user_name']) ?$map['user_name'] :''?>" maxlength="50" id="user_name" name="user_name" placeholder="请输入用户姓名"/>
                </div>
            </div>-->
            <div class="custom-form-item">
                <button class="layui-btn search" lay-submit lay-filter="search">搜索</button>
            </div>
            <div class="layui-clear"></div>
        </form>
    </blockquote>
    <blockquote class="layui-elem-quote">
        <a href="#"  class="layui-btn layui-btn-small add">
            <i class="layui-icon">&#xe608;</i> 添加任务
        </a>
        <a href="#" class="layui-btn layui-btn-small" id="batchdata">
            <i class="fa fa-shopping-cart" aria-hidden="true"></i> 批量处理操作
        </a>
    </blockquote>
    
  
</div>

<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>

<script>
    var form,layer,$,laydate;
    layui.config({
        base: '__PUBLIC__/layui/modules/'
    });
    layui.use(['layer','icheck', 'form','laypage','laytpl','laydate'], function () {
        var laypage = layui.laypage,laytpl = layui.laytpl;
        laydate = layui.laydate;
        form = layui.form();
        $ = layui.jquery
        layer=layui.layer;
        var pagelistdate;
        var curr;
        form.render();
        $('input').iCheck({
            checkboxClass: 'icheckbox_flat-green'
        });
        
  

        $('.add').click(function(){
            var url = "{:U('Rpc/planTask')}";
            $.post(url,{'type':1},function(data){
               
            });
        });

        function caozuo(){
            $('.del').click(function () {
                var id = $(this).attr('data');
                var url = "{:U('Task/deletetask')}";
                layer.confirm('删除站点所有站点用户关联数据也会被删除，可能耗时较长确认删除吗', {
                    icon: 3,
                    skin: 'layer-ext-moon',
                    btn: ['确认','取消']
                }, function(){
                    $.post(url,{keyid:id},function(data){
                        if(data.code=='4001'){
                            layer.msg(data.msg,{icon: 5});
                        }else{
                            layer.msg(data.msg, {
                                icon: 6,
                                time: 2000
                            }, function(){
                                //window.location.reload();
                            });
                        }
                    });
                });
            });
        }
    });
</script>
</body>

</html>